import request from '@/utils/request'

// 查询非常规工作记录
export const getSpecialTask = (params) => {
  return request({
    url: '/v1/departmentWork/specialTask/',
    method: 'get',
    params
  })
}

// 修改非常规工作
export const saveSpecialTask = (data) => {
  return request({
    url: '/v1/departmentWork/specialTask/',
    method: 'put',
    data
  })
}

// 添加一个记录
export const addMySpecialTask = (data) => {
  return request({
    url: '/v1/departmentWork/specialTask/my/',
    method: 'post',
    data
  })
}

// 获取记录
export const getMySpecialTask = (params) => {
  return request({
    url: '/v1/departmentWork/specialTask/my/',
    method: 'get',
    params
  })
}

// 删除记录
export const deleteMySpecialTask = (data) => {
  return request({
    url: '/v1/departmentWork/specialTask/my/',
    method: 'delete',
    data
  })
}

// 统计
export const getTaskStatistics = (params) => {
  return request({
    url: '/v1/departmentWork/specialTask/statistics/',
    method: 'get',
    params
  })
}

// 按月统计数量
export const sTaskMonthly = (params) => {
  return request({
    url: '/v1/departmentWork/specialTask/statisticsMonthly/',
    method: 'get',
    params,
  })
}


// 管理刪除记录
export const DeleteSpecialWork = (rid) => {
  return request({
    url: '/v1/departmentWork/specialTask/manage/',
    method: 'delete',
    params: { rid },
  })
}
